package com.butterfly.hotkey.worker.util;


import cn.hutool.core.util.StrUtil;
import com.butterfly.hotkey.core.model.HotKeyModel;

/**
 * @author butterfly
 * @version 1.0
 */
public class WorkerUtil {

    /**
     * 构建缓存key
     *
     * @param hotKeyModel hotKeyModel
     * @return cache key
     */
    public static String buildCacheKey(HotKeyModel hotKeyModel) {
        String key = hotKeyModel.getKey();
        String appName = hotKeyModel.getAppName();

        return StrUtil.join(StrUtil.UNDERLINE, appName, key);
    }

}
